home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20000824-20010305
/
000162_news@columbia.edu _Fri Dec 29 14:12:36 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
2KB
Return-Path: <news@columbia.edu>
Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
by fozimane.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id OAA09150
for <kermit.misc@cpunix.cc.columbia.edu>; Fri, 29 Dec 2000 14:12:36 -0500 (EST)
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id OAA02770
for <kermit.misc@watsun.cc.columbia.edu>; Fri, 29 Dec 2000 14:12:35 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id OAA10893
for kermit.misc@watsun.cc.columbia.edu; Fri, 29 Dec 2000 14:10:06 -0500 (EST)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: Barry Margolin <barmar@genuity.net>
Subject: Re: Converting struct tm to time_t
Organization: Genuity, Cambridge, MA
Message-ID: <_i536.49$GV6.477@burlma1-snr2>
Date: Fri, 29 Dec 2000 19:08:42 GMT
To: kermit.misc@columbia.edu
In article <92im31$9ii$1@newsmaster.cc.columbia.edu>,
Frank da Cruz <fdc@watsun.cc.columbia.edu> wrote:
>In article <yllmszt7lk.fsf@windlord.stanford.edu>,
>Russ Allbery <rra@stanford.edu> wrote:
>: My code doesn't assume it's unsigned; it just won't generate negative
>: time_t values. It works fine on systems with a signed time_t (basically
>: all of them).
>:
>OK, great.
>
>: I believe that both of these assumptions are required by POSIX; they're
>: certainly true on every UNIX system that I've ever seen.
>:
>But there are still lots of non-POSIX UNIXes running and I try to support
>them.
I believe the assumption that time_t is an integer seconds since 1/1/1970
00:00 UT has been true on all Unix systems. POSIX didn't originate it, it
simply adopted the de facto standard. Unix programs that deal with time
have been making this assumption for years. The only change I expect will
ever happen is the size of the integer type, to deal with the Y2.036K bug.
ANSI/ISO C generalized it to allow other representations, so you might not
be able to get away with it on non-Unix-like systems.
--
Barry Margolin, barmar@genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.